#include<bits/stdc++.h>
using namespace std;

int a[10];

int main(){
	int ans = 0;
	for(int i = 1;i <= 6;i++){
		cin>>a[i];
		if(a[i] == i){
			ans++;
			cout<<"*";
		}
	}
	if(!ans)
		cout<<"Sorry!Unlucky!";
	return 0;
}
